
<script>
export default {
  watch: {
    // 监听传感器数据变化
    vuex_userLoginInfo(val) {
      this.sensorsSetFn(val)
    }
  },
  onLaunch(options) {
    // console.log(options);
  },
  onShow: function(options) {
    uni.$u.vuex('vuex_imgPath', 'https://fsyuncai-file.oss-cn-beijing.aliyuncs.com/applet');
    console.log(this.vuex_imgPath, '123')
    // #ifdef MP-ALIPAY
    //获取关联普通二维码的码值，放到全局变量qrCode中
    if (options.query && options.query.qrCode) {
      console.log(options)
    }
    // #endif
    /*获取设备信息*/
    uni.getSystemInfo().then(res => {
      uni.$u.vuex('vuex_systemInfo', res);
    })
    /*获取网络状态*/
    uni.getNetworkType().then(res => {
      uni.$u.vuex('vuex_networkType', res[1].networkType);
    })
    uni.onNetworkStatusChange((res) => {
      uni.$u.vuex('vuex_networkType', res.networkType);
    });
    /*小程序升级*/
    const updateManager = uni.getUpdateManager();
    updateManager.onCheckForUpdate(function(res) {
      // 请求完新版本信息的回调
      console.log(res);
      if (res.hasUpdate) {
        updateManager.onUpdateReady(function(res) {
          uni.showModal({
            title: '更新提示',
            content: '新版本已经准备好，是否重启应用？',
            success(res) {
              if (res.confirm) {
                // 新的版本已经下载好，调用 applyUpdate 应用新版本并重启
                updateManager.applyUpdate();
              }
            }
          });
        });
        updateManager.onUpdateFailed(function(res) {
          // 新的版本下载失败
          // console.log(res);
        });
      }
    });
  },
  mounted: function() {

  },
  methods: {

    onHide: function() {
    // console.log('App Hide')
    },
  }
}
</script>

<style lang="scss">
	/*每个页面公共css */
  @import 'uview-ui/index.scss';
  body{
    font-size: 24rpx;
    //#ifdef MP-WEIXIN
    background:#f5f5f5;
    //#endif
  }
  .list-bg{
    background:$uni-bg-color;
    box-shadow: 0 0 20rpx 2rpx rgba(0,0,0,0.02);
    border-radius:$uni-border-radius-base;
    margin:16rpx $uni-spacing-row-base 0;
    overflow: hidden;
    .list-title{
      margin:0 $uni-spacing-row-base;
      font-size:$uni-font-size-lg;
      font-weight: bold;
      height: 86rpx;
      line-height: 86rpx;
      border-bottom: 1px solid #f5f5f5;
    }
  }
  .list-group-link{
    position: relative;
    .u-cell__title-text{
      font-size:$uni-font-size-sm;
    }
    .u-cell__value{
      font-size:$uni-font-size-sm;
    }
  }
  .list-group{
    font-size:$uni-font-size-sm!important;
  }
  .list-group-row {
    .list-title{
      border:0;
      font-size:$uni-font-size-base;
    }
    .number{
      float: right;
      font-weight: normal;
    }
  }

  .btn-orange{
    padding: 0 102rpx;
    height: 80rpx;
    border-radius:8rpx;
    font-size:$uni-font-size-base;
    line-height: 80rpx;
    color:$uni-text-color-inverse!important;
    display: inline-block;
    background: $uni-bg-color-red!important;
  }
  .btn-border-gray{
    padding: 0 102rpx;
    height: 80rpx;
    width: auto;
    background:$uni-bg-color!important;
    border-radius:8rpx;
    border:2rpx solid $uni-border-color-gray!important;
    font-size:$uni-font-size-base;
    line-height: 80rpx;
    display: inline-block;
  }
  uni-button:after{
    border:0;
  }
  ::v-deep .btn-boundless{border-color:#d3d3d3!important;}
  ::v-deep .btn-noborder,.btn-orange{border: 0!important;border-radius:$uni-border-radius-default;}
  ::v-deep .u-toolbar__title{color: #222222;font-size: 28rpx;font-weight: 700;}
::v-deep .uni-picker-container .uni-picker-action.uni-picker-action-confirm{
  color: #FF0D35!important;
}
</style>
